/*
 * Copyright (C) 2009 Ionut Dediu <deionut@yahoo.com>
 *
 * Licensed under the GNU General Public License Version 2
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// TimeWrap.h

#ifndef __TIME_WRAP_H__
#define __TIME_WRAP_H__

#include <e32base.h>
#include <e32std.h>

class MTimeWrapObserver
{
public:
	virtual void TimeElapsed() = 0;
};

class CTimeWrap : public CActive
{
public:
	static CTimeWrap* NewL(MTimeWrapObserver& aObserver);
    static CTimeWrap* NewLC(MTimeWrapObserver& aObserver);
    void After(TTimeIntervalMicroSeconds32 aInterval);
    ~CTimeWrap();

protected:

	// From CActive:
    void DoCancel();
    void RunL();

private:

	CTimeWrap(MTimeWrapObserver& aObserver);
    void ConstructL();

	// Member variables
	// Filter data:
    MTimeWrapObserver& iObserver;
    RTimer iTimer;
};

#endif//__TIME_WRAP_H__
